import Mock from 'mockjs'
import homeApi from './mockServeData/home'
import user from './mockServeData/user'
import permission from './mockServeData/permission'
// 游戏数据
import gameApi from './mockServeData/game'
// 定义mock请求拦截
// Mock.mock('/api/home/getData',function(){
//     // 拦截到请求后的处理逻辑
//     console.log('拦截到了')
// })

Mock.mock('/api/home/getData',homeApi.getStatisticalData)
// 游戏
Mock.mock('/api/mall/getDataGame',gameApi.getGameData)

// 用户列表的数据
Mock.mock('/api/user/add', 'post', user.createUser)
Mock.mock('/api/user/edit', 'post', user.updateUser)
Mock.mock('/api/user/del', 'post', user.deleteUser)
// Mock.mock('/api/user/getUser', user.getUserList)
// （'/api/user/getUser'）此时绝对路径访问不了  应使用正则才可以访问
Mock.mock(/api\/user\/getUser/, user.getUserList)


Mock.mock(/api\/permission\/getMenu/, 'post', permission.getMenu)